#include <stdio.h>
#include "ts.h"

int main()
{
    ts_msg_p ts_p;
    ts_p=TS_Init(TS_DEVPATH);
    while(1)
    {
        //bzero(ts_p, sizeof(ts_msg)); 
        TS_GetVal(ts_p);
        if(ts_p->up_flag==1)
        {
            printf("上划\n");
        }
        if(ts_p->down_flag==1)
        {
            printf("下划\n");
        }
        if(ts_p->left_flag==1)
        {
            printf("左划\n");

        }
        if(ts_p->right_flag==1)
        {
            printf("右划\n");
        }
    }
    TS_UnInit(ts_p);
    return 0;
}